#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test EmacsLisp support: strings with hexadecimal escape sequences that are
# invalid UTF-8.

cat <<\EOF > xg-el-3.el
(_ "\xE0")
EOF

: ${XGETTEXT=xgettext}
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location --from-code=UTF-8 -d xg-el-3.tmp xg-el-3.el 2>xg-el-3.err
result=$?
cat xg-el-3.err
test $result = 1 || Exit 1
grep 'is not UTF-8 encoded' xg-el-3.err >/dev/null || Exit 1

exit 0
